package main

import (
	"strings"
)

func maxRepeating(sequence string, word string) int {
	count := 0
	tempStr := word
	for true {
		index := strings.Index(sequence, tempStr)
		if index < 0 {
			break
		}
		count++
		tempStr += word
	}

	return count
}

func main() {
	maxRepeating("aaabaaaabaaabaaaabaaaabaaaabaaaaba",
		"aaaba")
}
